package com.iot.comprehensive.face.service.impl;

import com.iot.comprehensive.face.dao.HostDao;
import com.iot.comprehensive.face.model.Host;
import com.iot.comprehensive.face.service.HostService;
import lombok.Data;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 朱泽玉
 * @Create 2021/7/3 10:52
 * @Description
 * @Modified By:
 */
@Data
@Service
public class HostServiceImpl implements HostService {
    final HostDao hostDao;

    @Override
    public List<Host> findAll() {
        return hostDao.findAll();
    }

    @Override
    public Host findById(Long id) {
        return hostDao.findById(id).orElse(null);
    }

    @Override
    public void save(Host host) {
        hostDao.save(host);

    }
}
